package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 风险评估-设备表 实体类
 * 表名：risk_device
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "risk_device")
public class RiskDevice implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键ID
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 租户ID
     */
    @Column(name = "tenant_id", nullable = false)
    private Long tenantId;
    
    /**
     * 部门ID
     */
    @Column(name = "department_id", nullable = false)
    private Long departmentId;
    
    /**
     * 设备分组ID
     */
    @Column(name = "device_group_id")
    private Long deviceGroupId;
    
    /**
     * 设备名称
     */
    @Column(name = "device_name", nullable = false, length = 100)
    private String deviceName;
    
    /**
     * 设备类型（关联 risk_device_type 表）
     */
    @Column(name = "device_type_id")
    private Long deviceTypeId;
    
    /**
     * 颜色
     */
    @Column(name = "device_color", length = 50)
    private String deviceColor;
    
    /**
     * 描述
     */
    @Column(name = "device_description", length = 65535)
    private String deviceDescription;
    
    /**
     * 位号
     */
    @Column(name = "device_tag_number", length = 100)
    private String deviceTagNumber;
    
    /**
     * 主要参数
     */
    @Column(name = "main_parameters", length = 500)
    private String mainParameters;
    
    /**
     * 会期（yyyy-MM-dd）
     */
    @Column(name = "schedule_date", length = 10)
    private String scheduleDate;
    
    /**
     * 事故链数量
     */
    @Column(name = "accident_chains_num")
    private Integer accidentChainsNum;
    
    /**
     * 排序号
     * 默认值: 0
     */
    @Column(name = "sort_num")
    private Integer sortNum;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time", length = 20)
    private String createTime;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time", length = 20)
    private String updateTime;
    
    /**
     * 创建人
     */
    @Column(name = "create_by")
    private Long createBy;
    
    /**
     * 更新人
     */
    @Column(name = "update_by")
    private Long updateBy;
    
    /**
     * 逻辑删除标志（0：正常，1：删除）
     * 默认值: 0
     */
    @Column(name = "is_del")
    private Boolean isDel;
    
    @Override
    public String toString() {
        return "RiskDevice{" +
            "id=" + id +
            ", tenantId=" + tenantId +
            ", departmentId=" + departmentId +
            ", deviceGroupId=" + deviceGroupId +
            ", deviceName=" + deviceName +
            ", deviceTypeId=" + deviceTypeId +
            ", deviceColor=" + deviceColor +
            ", deviceDescription=" + deviceDescription +
            ", deviceTagNumber=" + deviceTagNumber +
            ", mainParameters=" + mainParameters +
            ", scheduleDate=" + scheduleDate +
            ", accidentChainsNum=" + accidentChainsNum +
            ", sortNum=" + sortNum +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", createBy=" + createBy +
            ", updateBy=" + updateBy +
            ", isDel=" + isDel +
        '}';
    }
} 